home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / windows / wdj1096.zip / ZOLMAN.ZIP / DRAW.ZIP / DRAW.CPP < prev    next >
C/C++ Source or Header  |  1996-05-22  |  2KB  |  80 lines

  1. // Draw.cpp : Implementation of CDrawApp and DLL registration.
  2.  
  3. #include "stdafx.h"
  4. #include "Draw.h"
  5.  
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11.  
  12.  
  13. CDrawApp NEAR theApp;
  14.  
  15. const GUID CDECL BASED_CODE _tlid =
  16.         { 0x23c3760, 0xb40a, 0x11cf, { 0xa6, 0x4f, 0, 0xa0, 0x24, 0x25, 0xfb, 0x94 } };
  17. const WORD _wVerMajor = 1;
  18. const WORD _wVerMinor = 0;
  19.  
  20.  
  21. ////////////////////////////////////////////////////////////////////////////
  22. // CDrawApp::InitInstance - DLL initialization
  23.  
  24. BOOL CDrawApp::InitInstance()
  25. {
  26.     BOOL bInit = COleControlModule::InitInstance();
  27.  
  28.     if (bInit)
  29.     {
  30.         // TODO: Add your own module initialization code here.
  31.     }
  32.  
  33.     return bInit;
  34. }
  35.  
  36.  
  37. ////////////////////////////////////////////////////////////////////////////
  38. // CDrawApp::ExitInstance - DLL termination
  39.  
  40. int CDrawApp::ExitInstance()
  41. {
  42.     // TODO: Add your own module termination code here.
  43.  
  44.     return COleControlModule::ExitInstance();
  45. }
  46.  
  47.  
  48. /////////////////////////////////////////////////////////////////////////////
  49. // DllRegisterServer - Adds entries to the system registry
  50.  
  51. STDAPI DllRegisterServer(void)
  52. {
  53.     AFX_MANAGE_STATE(_afxModuleAddrThis);
  54.  
  55.     if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
  56.         return ResultFromScode(SELFREG_E_TYPELIB);
  57.  
  58.     if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
  59.         return ResultFromScode(SELFREG_E_CLASS);
  60.  
  61.     return NOERROR;
  62. }
  63.  
  64.  
  65. /////////////////////////////////////////////////////////////////////////////
  66. // DllUnregisterServer - Removes entries from the system registry
  67.  
  68. STDAPI DllUnregisterServer(void)
  69. {
  70.     AFX_MANAGE_STATE(_afxModuleAddrThis);
  71.  
  72.     if (!AfxOleUnregisterTypeLib(_tlid))
  73.         return ResultFromScode(SELFREG_E_TYPELIB);
  74.  
  75.     if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
  76.         return ResultFromScode(SELFREG_E_CLASS);
  77.  
  78.     return NOERROR;
  79. }
  80.